package com.coc.Observer.usrJdkObser;

import java.util.Observable;
import java.util.Observer;

public class TestMain {

    public static void main(String[] args) {

        // 主题
        CarColor car = new CarColor();

        // 观察者
        Observer o1 = new ConcreteObserver();
        Observer o2 = new ConcreteObserver2();

        
        car.addObserver(o1);
        car.addObserver(o2);

        car.change("red");





    }

}
